<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>


<html>
<head>
	<title>平台管理</title>
	<%@ include file="../../common/base.jsp" %>

	<script type="text/javascript">
        $(function () {
            var cardProvince = $("#cardProvince").val();
            var cardCity = $("#cardCity").val();
            $.each(province, function (k, p) {
                var option = "";
                if(cardProvince != null && p.ProID == cardProvince){
                    option = "<option value='" + p.ProID + "' selected='selected'>" + p.ProName + "</option>";
                    $("#selCity option:gt(0)").remove();
                    var selValue = p.ProID;
                    $.each(city, function (i, j) {
                        if (j.ProID == selValue) {
                            var cityOption = "";
                            if(cardCity != null && j.CityID == cardCity){
                                cityOption = "<option value='" + j.ProID + "' selected='selected'>" + j.CityName + "</option>";
                            }else{
                                cityOption = "<option value='" + j.CityID + "'>" + j.CityName + "</option>";
                            }
                            $("#selCity").append(cityOption);
                        }
                    });
                }else{
                    option = "<option value='" + p.ProID + "'>" + p.ProName + "</option>";
                }
                $("#selProvince").append(option);

            });

            $("#selProvince").change(function () {
                var selValue = $(this).val();
                $("#selCity option:gt(0)").remove();

                $.each(city, function (k, p) {
                    if (p.ProID == selValue) {
                        var option = "<option value='" + p.CityID + "'>" + p.CityName + "</option>";
                        $("#selCity").append(option);
                    }
                });
            });
        });

        var flag=0;		//flag作用：分两种情况提交信息，如果是修改操作，没有修改上传文件，只修改其他字段的信息时点保存也能提交信息
        function uploadKeyFile(){
            $.ajaxFileUpload({
                //需要链接到服务器地址
                url:"partner/uploadSecurityKey",
                secureuri:false,
                fileElementId:'file',                        //文件选择框的id属性
                dataType: 'json', //返回值类型 一般设置为json
                success: function(data, status){
                    var obj = eval(data);
                    $("#key").val(obj.key);
                    prompt.alert("上传成功");
                },error: function (data, status, e){
                    prompt.alert("文件上传错误");
                }
            });
        }

        function getFileName(obj)
        {
            flag=1;
            var pos = -1;
            if(obj.value.indexOf("/") > -1){
                pos = obj.value.lastIndexOf("/")*1;
            }else if(obj.value.indexOf("\\") > -1){
                pos = obj.value.lastIndexOf("\\")*1;
            }
            var fileName =  obj.value.substring(pos+1);
            $("#fileName").val(fileName);
            $('.files').text(fileName);
        }

        function partnerLevelClick(){
            $("#parentPartnerIdZhu").html("");
            $("#parentPartnerIde").hide();
            $("#parentPartnerIdZhu").hide();
            var partnerLevel = $("#partnerLevel").val();
            $("#parentPartnerId").val("");
            if(partnerLevel == 1){
                $("#ppartnerId").hide();
                return
            }else{
                $("#ppartnerId").show();
                $.ajax({
                    url: "partner/queryPartnerByLevelId",
                    type:"POST",
                    data:{partnerLevel:(partnerLevel-1)} ,
                    beforeSend:function(XMLHttpRequest){
                        $("#mainDiv").showLoading();
                    },
                    error:function(XMLHttpRequest, textStatus, errorThrown){
                        prompt.alert("系统错误");
                        $("#mainDiv").hideLoading();
                    },
                    success:function(data){
                        $("#mainDiv").hideLoading();
                        $("#parentPartnerId").html("");
                        loadSelectResult(data);
                    }
                });
            }
        }

        function loadSelectResult(data){
            var jo = data.levelJson;
            if(jo != '' && jo != null){
                $("#parentPartnerId").append("<option value='' selected='selected'>--请选择上级渠道--</option>");
                for(var o in jo){
                    $("#parentPartnerId").append("<option value='"+jo[o].partnerId+"'>"+jo[o].name+"</option>");
                }
            }
        }

        function existPartnerName(partnerName){
            $.ajax({
                url: "partner/validatePartnerName",
                type:"POST",
                async: false,
                data:{partnerName:partnerName} ,
                success:function(data,status){
                    //处理提示
                    var obj = eval(data);
                    if(data.key == 1){
                        $("#partnerNamee").show();
                        $("#partnerNameZhu").show();
                        $("#partnerNameZhu").append("渠道名已存在！");
                        if(focusFlag){
                            locationFocus("partnerName");
                        }
                    }else if(data.key == 2){
                        $("#partnerNamee").show();
                        $("#partnerNameZhu").show();
                        $("#partnerNameZhu").append("后台系统错误，请稍后再试");
                        if(focusFlag){
                            locationFocus("partnerName");
                        }
                    }else{
                        $("#partnerNames").show();
                        flag = true;
                    }
                },error:function(data,status, e){
                    $("#partnerNamee").show();
                    $("#partnerNameZhu").show();
                    $("#partnerNameZhu").append("后台系统错误，请稍后再试");
                    if(focusFlag){
                        locationFocus("partnerName");
                    }
                }
            });
        }

        function partnerNameValide(focusFlag){
            var partnerName = $("#partnerName").val();
            $("#partnerNameZhu").html("");
            $("#partnerNameZhu").hide();
            $("#partnerNames").hide();
            var reg = /^([A-Za-z]|[\u4E00-\u9FA5]){2,30}$/;
            if(!reg.test(partnerName)){
                $("#partnerNameZhu").show();
                $("#partnerNameZhu").append("输入错误，由2-30位字母或汉字组成！");
                if(focusFlag){
                    locationFocus("partnerName");
                }
                return false;
            }
            else if (existPartnerName(partnerName)) {
                return false;
            }
            else{
                $("#partnerNames").show();
                return true;
            }
        }
        function responsorValid(focusFlag){
            var responsor = $("#responsor").val();
            $("#responsorZhu").html("");
            $("#responsorZhu").hide();
            $("#responsors").hide();
            var reg = /^[\u4e00-\u9fa5]{2,10}$/;  //定义正则表达式
            if(!reg.test(responsor)){
                $("#responsorZhu").show();
                $("#responsorZhu").append("输入有误,由2-10位汉字组成！");
                if(focusFlag){
                    locationFocus("responsor");
                }
                return false;
            }else{
                $("#responsors").show();
                return true;
            }
        }

        function companyAddValide(focusFlag){
            var companyAdd = $("#companyAdd").val();
            $("#companyAddZhu").html("");
            $("#companyAddZhu").hide();
            $("#companyAdds").hide();
            var reg = /^([A-Za-z]|[\u4E00-\u9FA5]){2,30}$/;  //定义正则表达式
            if(!reg.test(companyAdd)){
                $("#companyAddZhu").show();
                $("#companyAddZhu").append("输入有误,由2-30位字母或汉字组成！");
                if(focusFlag){
                    locationFocus("companyAdd");
                }
                return false;
            }else{
                $("#companyAdds").show();
                return true;
            }
        }

        function addPartnerSubmit(){
            var boo = partnerIdBlur(true);
            if(!boo){
                return;
            }
            if(!partnerNameValide(true)){
                return;
            }
            if(!validateContentNotNull("businessName",1,30,"所属公司名称",true)){
                return;
            }
            if(!companyAddValide(true)){
                return;
            }
            if(!pushAddValidate(true)){
                return;
            }
            if(!loginNameBlur(true)){
                return;
            }
            if(!validateContentNotNull("password",6,22,3,true)){
                return;
            }
            if(!conPasswordBlur(true)){
                return;
            }
            if(!responsorValid(true)){
                return;
            }
            if(!phoneBlur(true)){
                return;
            }
            if(!cardNoBlur(true)){
                return;
            }
            if(!payCardNoBlur(true)){
                return
            }
            $("#partnerInfoBO").submit();
        }

        function parentPartnerIdChange(){
            $("#parentPartnerIdZhu").html("");
            $("#parentPartnerIds").hide();
            $("#parentPartnerIde").hide();
            $("#parentPartnerIdZhu").hide();
            var parentPartnerId = $("#parentPartnerId").val();
            var partnerLevel = $("#partnerLevel").val();
            if(parentPartnerId != null && parentPartnerId.length > 0){
                $("#parentPartnerIds").show();
            }else{
                $("#parentPartnerIde").show();
                $("#parentPartnerIdZhu").show();
                $("#parentPartnerIdZhu").append("请选择上级渠道！");
            }
        }

        //渠道编码
        function partnerIdBlur(focusFlag){
            var partnerId = $("#partnerId").val();
            var parentPartnerId = $("#parentPartnerId").val();
            var partnerLevel = $("#partnerLevel").val();
            var codeLen = $("#partnerLevel_"+partnerLevel).val();
            var pcodeLen = $("#partnerLevel_"+(partnerLevel-1)).val();
            //alert(parentPartnerId);
            //alert(partnerId.substr(0,pcodeLen)+"----"+partnerId+"----"+parentPartnerId+"----"+codeLen);
            $("#partnerIdZhu").html("");
            $("#partnerIds").hide();
            $("#partnerIde").hide();
            $("#partnerIdZhu").hide();
            $("#parentPartnerIdZhu").html("");
            $("#parentPartnerIds").hide();
            $("#parentPartnerIde").hide();
            $("#parentPartnerIdZhu").hide();
            var reg = new RegExp("^[0-9][0-9]*$");
            if(partnerLevel > 1){
                if(parentPartnerId ==null || parentPartnerId.length < 1){
                    $("#parentPartnerIde").show();
                    $("#parentPartnerIdZhu").show();
                    $("#parentPartnerIdZhu").append("请选择上级渠道！");
                    return false;
                }
            }

            if(partnerId ==null || partnerId.length < 1 || !reg.test(partnerId)){
                $("#partnerIde").show();
                $("#partnerIdZhu").show();
                $("#partnerIdZhu").append("输入错误，请输入"+codeLen+"位数字编码！");
                if(focusFlag){
                    locationFocus("partnerId");
                }
                return false;
            }else if(partnerId.length != codeLen){
                $("#partnerIde").show();
                $("#partnerIdZhu").show();
                $("#partnerIdZhu").append("输入错误，请输入"+codeLen+"位数字编码！");
                if(focusFlag){
                    locationFocus("partnerId");
                }
                return false;
            }else if(partnerLevel > 1 && (partnerId.substr(0,pcodeLen)) != parentPartnerId){
                $("#partnerIde").show();
                $("#partnerIdZhu").show();
                $("#partnerIdZhu").append("输入错误，请输入以"+parentPartnerId+"开头的"+codeLen+"位数字编码！");
                if(focusFlag){
                    locationFocus("partnerId");
                }
                return false;
            }else{
                var flag = false;
                $.ajax({
                    url: "partner/validatePartnerInfo",
                    type:"POST",
                    async: false,
                    data:{partnerId:partnerId} ,
                    success:function(data,status){
                        //处理提示
                        var obj = eval(data);
                        if(data.key == 1){
                            $("#partnerIde").show();
                            $("#partnerIdZhu").show();
                            $("#partnerIdZhu").append("渠道ID已存在！");
                            if(focusFlag){
                                locationFocus("partnerId");
                            }
                        }else if(data.key == 2){
                            $("#partnerIde").show();
                            $("#partnerIdZhu").show();
                            $("#partnerIdZhu").append("后台系统错误，请稍后再试");
                            if(focusFlag){
                                locationFocus("partnerId");
                            }
                        }else{
                            $("#partnerIds").show();
                            flag = true;
                        }
                    },error:function(data,status, e){
                        $("#partnerIde").show();
                        $("#partnerIdZhu").show();
                        $("#partnerIdZhu").append("后台系统错误，请稍后再试");
                        if(focusFlag){
                            locationFocus("partnerId");
                        }
                    }
                });
                return flag;

            }
        }

        //登录名
        function loginNameBlur(focusFlag){
            var loginName = $("#loginName").val();
            var partnerId = $("#partnerId").val();
            $("#loginNameZhu").html("");
            $("#loginNames").hide();
            $("#loginNamee").hide();
            $("#loginNameZhu").hide();
            var reg = new RegExp("^[0-9a-zA-Z]{5,22}$");
            if(loginName ==null || !reg.test(loginName)){
                $("#loginNamee").show();
                $("#loginNameZhu").show();
                $("#loginNameZhu").append("输入有误,由5-22位字母、数字组成！");
                if(focusFlag){
                    locationFocus("loginName");
                }
                return false;
            }else{
                var flag = false;
                $.ajax({
                    url: "partner/validateUserLoginName",
                    type:"POST",
                    async: false,
                    data:{partnerId:partnerId,loginName:loginName} ,
                    success:function(data,status){
                        //处理提示
                        var obj = eval(data);
                        if(data.key == 1){
                            $("#loginNamee").show();
                            $("#loginNameZhu").show();
                            $("#loginNameZhu").append("登录名"+loginName+"已存在！");
                        }else if(data.key == 2){
                            $("#loginNamee").show();
                            $("#loginNameZhu").show();
                            $("#loginNameZhu").append("后台系统错误，请稍后再试");
                        }else{
                            $("#loginNames").show();
                            flag = true;
                        }
                    },error:function(data,status, e){
                        $("#loginNamee").show();
                        $("#loginNameZhu").show();
                        $("#loginNameZhu").append("后台系统错误，请稍后再试");
                    }
                });
                $("#loginNames").show();
                return flag;
            }
        }


        //确认密码
        function conPasswordBlur(focusFlag){
            var conPassword = $("#conPassword").val();
            var password = $("#password").val();
            $("#conPasswordZhu").html("");
            $("#conPasswords").hide();
            $("#conPassworde").hide();
            $("#conPasswordZhu").hide();
            var reg = new RegExp("^[0-9a-zA-Z]{6,22}$");
            if(conPassword ==null || conPassword.length < 1 || !reg.test(conPassword)){
                $("#conPassworde").show();
                $("#conPasswordZhu").show();
                $("#conPasswordZhu").append("输入有误,由6-22位数字或字母组成！");
                if(focusFlag){
                    locationFocus("conPassword");
                }
                return false;
            }else if (conPassword != password){
                $("#conPassworde").show();
                $("#conPasswordZhu").show();
                $("#conPasswordZhu").append("两次填写的密码不一致");
                if(focusFlag){
                    locationFocus("conPassword");
                }
                return false;
            }else{
                $("#conPasswords").show();
                return true;
            }
        }


        //手机号码
        function phoneBlur(focusFlag){
            var phone = $("#phone").val();
            $("#phoneZhu").html("");
            $("#phones").hide();
            $("#phonee").hide();
            $("#phoneZhu").hide();
            var reg = /^1\d{10}$/;  //定义正则表达式
            if(phone ==null || !reg.test(phone)){
                $("#phonee").show();
                $("#phoneZhu").show();
                $("#phoneZhu").append("输入有误,手机号码由11位数字组成");
                if(focusFlag){
                    locationFocus("phone");
                }
                return false;
            }else{
                $("#phones").show();
                return true;
            }
        }
        //证件号码不能为
        function cardNoBlur(focusFlag){
            var cardType = $("#cardType").val();
            var cardNo = $("#cardNo").val();
            //var cno = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{4}$/;
            var cno= /^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/;
            $("#cardNoZhu").html("");
            $("#cardNos").hide();
            $("#cardNoe").hide();
            $("#cardNoZhu").hide();
            if(cardType == 1){
                if(!cno.test(cardNo)){
                    $("#cardNoe").show();
                    $("#cardNoZhu").show();
                    $("#cardNoZhu").append("输入错误，请输入18位有效身份证号！");
                    if(focusFlag){
                        locationFocus("cardNo");
                    }
                    return false;
                }
            }else{
                if(cardNo.length < 7 || cardNo.length > 20){
                    $("#cardNoe").show();
                    $("#cardNoZhu").show();
                    $("#cardNoZhu").append("输入错误，请输入7-20位有效证件号码！");
                    if(focusFlag){
                        locationFocus("cardNo");
                    }
                    return false;
                }
            }
            $("#cardNos").show();
            return true;
        }
        //
        function payCardNoBlur(focusFlag){
            var payCardNo = $("#payCardNo").val();
            var reg = new RegExp("^[0-9]*$");
            $("#payCardNoZhu").html("");
            $("#payCardNos").hide();
            $("#payCardNoe").hide();
            $("#payCardNoZhu").hide();
            if(payCardNo !=null &&  (payCardNo.length > 20 || !reg.test(payCardNo))){
                $("#payCardNoe").show();
                $("#payCardNoZhu").show();
                $("#payCardNoZhu").append("输入错误，请输入小于或等于20位的银行卡号");
                if(focusFlag){
                    locationFocus("payCardNo");
                }
                return false;
            }else{
                $("#payCardNos").show();
                return true;
            }
        }

        function fileChange(txt){
            $("#a_value_1").text(txt);
        }

        function typeClick(){
            var type = $("#type").val();
            if(type == 1){
                //$("#selectID option[text=5]").attr("selected", "selected");
                $("#cashierPlatId option[value='']").attr("selected", "selected");
                $("#cashierPlatId").attr("disabled", true);
            }else{
                $("#cashierPlatId").attr("disabled", false);
            }
        }

        function cascadeDisabled(){
            $("#pushAddZhu").hide();
            $("#pushAddZhu").html("");
            var need = $("#needResponsecheck").attr("checked");
            if("checked" === need){
                $("#pushAdd").attr("disabled",false);
                $("#needResponse").val(2);
            }else{
                $("#needResponse").val(1);
                $("#pushAdd").val("");
                $("#pushAdd").attr("disabled",true);
            }
        }

        function pushAddValidate(){
            $("#pushAddZhu").hide();
            $("#pushAddZhu").html("");
            var need = $("#needResponsecheck").attr("checked");
            if("checked" === need){
                var pashAdd = $("#pushAdd").val();
                if(pashAdd ==null || pashAdd.length < 2 || pashAdd.length > 50){
                    $("#pushAddZhu").show();
                    $("#pushAddZhu").append("输入错误，由2-50位字母组成！");
                    return false;
                }
            }
            return true;
        }

        function changeBankName(obj){
            var bankName = $(obj).find("option:selected").text();
            $("#bankName").val(bankName);
        }

	</script>
	<style>
		input[type="checkbox"].back_mess2
		{
			position: absolute;
			opacity: 0;
		}
		input[type="checkbox"].ios-switch + div
		{
			vertical-align: middle;
			border: 1px solid rgba(0,0,0,.4);
			border-radius: 999px;
			background-color: rgba(0, 0, 0, 0.1);
			-webkit-transition-duration: .4s;
			-webkit-transition-property: background-color, box-shadow;
			box-shadow: inset 0 0 0 0px rgba(0,0,0,0.4);
			vertical-align:middle;
		}
		input[type="checkbox"].ios-switch:checked + div
		{
			background-position: 0 0;
		}
		input[type="checkbox"].tinyswitch.ios-switch + div
		{
			width: 48px;
			height: 25px;
		}
		input[type="checkbox"].green.ios-switch:checked + div
		{
			background-color: #86B97E;
			border: 1px solid #719b6b;
			box-shadow: inset 0 0 0 10px rgba(134,185,126,1);
		}
		input[type="checkbox"].ios-switch + div > div
		{
			float: left;
			border-radius: inherit;
			background: #ffffff;
			-webkit-transition-timing-function: cubic-bezier(.54,1.85,.5,1);
			-webkit-transition-duration: 0.4s;
			-webkit-transition-property: transform, background-color, box-shadow;
			-moz-transition-timing-function: cubic-bezier(.54,1.85,.5,1);
			-moz-transition-duration: 0.4s;
			-moz-transition-property: transform, background-color;
			box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0px 0px 0 1px rgba(0, 0, 0, 0.4);
			pointer-events: none;
			margin-top: 1px;
			margin-left: 1px;
		}
		input[type="checkbox"].tinyswitch.ios-switch + div > div
		{
			width: 23px;
			height: 23px;
			margin-top: 1px;
		}
		input[type="checkbox"].tinyswitch.ios-switch:checked + div > div
		{
			-webkit-transform: translate3d(23px, 0, 0);
			-moz-transform: translate3d(23px, 0, 0);
		}
		input[type="checkbox"].green.ios-switch:checked + div > div
		{
			box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(113, 155, 107,1);
		}
	</style>
</head>

<body id="body">
<!--head-->
<div id="head">
	<jsp:include page="../../common/head.jsp"></jsp:include>
</div>
<!--head end-->
<!--container-->
<div id="container">
	<div id="pageId" style="display: none;">02-01-01</div>
	<!--sidebar-->
	<%@ include file="../../common/menu.jsp" %>
	<!--sidebar-->
	<!--main-->
	<div class="main" id="mainDiv">
		<div class="channel_manage">
			<div class="location" style="background-position:22px -29px;">
				平台管理<span>&gt;</span>贷款平台配置管理<span>&gt;</span>贷款平台管理<span>&gt;</span>${type=='save'?'添加':'修改' }平台
			</div>
			<c:forEach items="${dictPartnerIdRuleVO}" var="ct" varStatus="s">
				<input type="hidden" id="partnerLevel_${ct.codeLevel }" value="${ct.codeLength }">
			</c:forEach>
			<form action="partner/registerPartner" method="post" id="partnerInfoBO" enctype="multipart/form-data">
				<!--content-->
				<div class="content">
					<div class="channel_manage">
						<div class="inputInfoList">
							<!--渠道信息-->
							<div class="inputInfoList_lf">
								<ul>
									<li>
										<label>平台ID：</label>
										<input type="text" id="id" name="id" class="text" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="idBlur(); this.style.border = '1px solid #D5D5D5'"  maxlength="20" value="${platformDto.id}">
										<span class="red">*</span>
										<i class="s_tips" id="ids" style="display: none;"></i>
										<i class="e_tips" id="ide" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_1" id="idZhu" style="display: none;"></p>
									</li>
									<li>
										<label>平台名称：</label>
										<input type="text" class="text" id="platformName" name="platformName" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="validateContentNotNull('platformName',1,30,'平台名称'); this.style.border = '1px solid #D5D5D5'"  maxlength="30" value="${platformDto.platformName}">
										<span class="red">*</span>
										<i class="s_tips" id="platformNames" style="display: none;"></i>
										<i class="e_tips" id="platformNamee" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_1" id="platformNameZhu" style="display: none;"></p>
									</li>
									<li>
										<label>平台类型：</label>
										<select id="platformType" name="platformType" >
											<option value="">全部</option>
											<option value="1">API</option>
											<option value="2">H5</option>
										</select>
									</li>
									<li id="templateUrl">
										<label>API模板地址：</label>
										<input type="text" class="text"  id="apiTemplate" name="apiTemplate" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="validateContentNotNull('apiTemplate',1,60,'API模板地址'); this.style.border = '1px solid #D5D5D5'"  maxlength="60" value="${platformDto.apiTemplate}">
										<span class="red">*</span>
										<i class="s_tips" id="apiTemplates" style="display: none;"></i>
										<i class="e_tips" id="apiTemplatee" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_1" id="apiTemplateZhu" style="display: none;"></p>
									</li>
									<li>
										<label>链接地址：</label>
										<input type="text" class="text"  id="linkUrl" name="linkUrl" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="validateContentNotNull('linkUrl',1,30,'链接地址'); this.style.border = '1px solid #D5D5D5'"  maxlength="30" value="${partnerInfoBO.companyAdd}">
										<span class="red">*</span>
										<i class="s_tips" id="linkUrls" style="display: none;"></i>
										<i class="e_tips" id="linkUrle" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_1" id="linkUrlZhu" style="display: none;"></p>
									</li>
									<li>
										<label>还款类型：</label>
										<select id="repaymentType" name="repaymentType">
											<option value="">全部</option>
											<option value="1">日还</option>
											<option value="2">月还</option>
											<option value="3">日月还</option>
										</select>
									</li>
									<li>
										<label>最快放款速度：</label>
										<<input type="text" class="text"  id="fastestTime" name="fastestTime" onFocus="this.style.border = '1px solid #2A7CCF'"
												onBlur="validateContentNotNull('fastestTime',1,30,'最快放款速度',1); this.style.border = '1px solid #D5D5D5'"  maxlength="30" value="${partnerInfoBO.companyAdd}">
										<span class="red">*</span>
										<i class="s_tips" id="fastestTimes" style="display: none;"></i>
										<i class="e_tips" id="fastestTimee" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_1" id="fastestTimeZhu" style="display: none;"></p>
									</li>
									<li>
										<label>资金管理类型：</label>
										<select id="fundsType" name="fundsType">
											<c:forEach items="${partnerFundsType }" var="pft" varStatus="s">
												<option value="${pft.enumCode }" <c:if test="${pft.enumCode==partnerInfoBO.fundsType}">selected="selected"</c:if> >${pft.enumName }</option>
											</c:forEach>
										</select>
									</li>
									<li>
										<label>是否回推消息：</label>
										<input type="hidden" id="needResponse" name="needResponse" value = "${partnerInfoBO.needResponse }">
										<label style="text-align:left;">
											<input type="checkbox" class="ios-switch green tinyswitch back_mess back_mess2" id="needResponsecheck" name="needResponsecheck"
												   onClick="cascadeDisabled();"  <c:if test="${partnerInfoBO.needResponse == 2}">checked="checked"</c:if>>
											<div><div></div></div>
										</label>
									</li>
									<li>
										<label>回推地址：</label>
										<input type="text" class="text"  id="pushAdd" name="pushAdd"  onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="pushAddValidate(); this.style.border = '1px solid #D5D5D5'"  maxlength="50"  value="${partnerInfoBO.pushAdd }"
											   <c:if test="${partnerInfoBO.needResponse != 2}">disabled="disabled"</c:if>>
										<p class="zhu_shi_1" id="pushAddZhu" style="display: none;"></p>
									</li>
									<li>
										<label>平台LOGO：</label>
										<div class="file">
											<input type="file" id="file" name="file" onChange="fileChange(this.value)" value="${platformDto.logoUrl }">
											<span id="a_value_1">选择LOGO图片文件上传</span>
											<input type="hidden" id="logoUrl" name="logoUrl" >
										</div>
									</li>
								</ul>
							</div>
							<!--渠道信息-->
							<!--渠道账号信息-->
							<div class="inputInfoList_rt">
								<h2>渠道账号信息：(带<span class="red">*</span>号为必填字段)</h2>
								<ul>
									<li>
										<label>登录名：</label>
										<input type="text" class="text" id="loginName" name="loginName" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="loginNameBlur(); this.style.border = '1px solid #D5D5D5'"  maxlength="22" value="${partnerInfoBO.loginName }">
										<span class="red">*</span>
										<i class="s_tips" id="loginNames" style="display: none;"></i>
										<i class="e_tips" id="loginNamee" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="loginNameZhu" style="display: none;"></p>
									</li>
									<li>
										<label>登录密码：</label>
										<input type="password" class="text" id="password" name="password" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="validateContentNotNull('password',6,22,3); this.style.border = '1px solid #D5D5D5'"  maxlength="22" value="${partnerInfoBO.password }">
										<span class="red">*</span>
										<i class="s_tips" id="passwords" style="display: none;"></i>
										<i class="e_tips" id="passworde" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="passwordZhu" style="display: none;"></p>
									</li>
									<li>
										<label>登录确认密码：</label>
										<input type="password" class="text" id="conPassword" name="conPassword" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="conPasswordBlur(); this.style.border = '1px solid #D5D5D5'"  maxlength="22" value="${partnerInfoBO.password }">
										<span class="red">*</span>
										<i class="s_tips" id="conPasswords" style="display: none;"></i>
										<i class="e_tips" id="conPassworde" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="conPasswordZhu" style="display: none;"></p>
									</li>
									<li>
										<label>渠道负责人：</label>
										<input type="text" class="text" id="responsor" name="responsor" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="responsorValid(true); this.style.border = '1px solid #D5D5D5'"  maxlength="10" value="${partnerInfoBO.responsor }">
										<span class="red">*</span>
										<i class="s_tips" id="responsors" style="display: none;"></i>
										<i class="e_tips" id="responsore" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="responsorZhu" style="display: none;"></p>
									</li>
									<li>
										<label>手机号：</label>
										<input type="text" class="text" id="phone" name="phone" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="phoneBlur(); this.style.border = '1px solid #D5D5D5'"  maxlength="11" value="${partnerInfoBO.phone }">
										<span class="red">*</span>
										<i class="s_tips" id="phones" style="display: none;"></i>
										<i class="e_tips" id="phonee" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="phoneZhu" style="display: none;"></p>
									</li>
									<li>
										<label>证件类型：</label>
										<select id="cardType" name="cardType">
											<c:forEach items="${cardType}" var="ct" varStatus="s">
												<c:if test="${partnerInfoBO.cardType != null }">
													<option value="${ct.enumCode }"  <c:if test="${ct.enumCode ==partnerInfoBO.cardType}">selected="selected"</c:if>>${ct.enumName }</option>
												</c:if>
												<c:if test="${partnerInfoBO.cardType == null }">
													<option value="${ct.enumCode }"  <c:if test="${ct.enumCode ==1}">selected="selected"</c:if>>${ct.enumName }</option>
												</c:if>
											</c:forEach>
										</select>
									</li>
									<li>
										<label>证件号码：</label>
										<input type="text" class="text" id="cardNo" name="cardNo" onFocus="this.style.border = '1px solid #2A7CCF'"
											   onBlur="cardNoBlur(); this.style.border = '1px solid #D5D5D5'"  maxlength="20" value="${partnerInfoBO.cardNo }">
										<span class="red">*</span>
										<i class="s_tips" id="cardNos" style="display: none;"></i>
										<i class="e_tips" id="cardNoe" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="cardNoZhu" style="display: none;"></p>
									</li>
									<li>
										<label>银行名称：</label>
										<input type="hidden" id="bankName" name="bankName" value="${partnerInfoBO.bankName }">
										<select id="payCardType" name="payCardType" onchange="changeBankName(this);" >
											<option value="">--请选择银行名称--</option>
											<c:forEach items="${payOrgVo }" var="pov" varStatus="s">
												<option value="${pov.bankCode} " <c:if test="${pov.bankName ==partnerInfoBO.bankName}">selected="selected"</c:if>>${pov.bankName }</option>
											</c:forEach>
										</select>
									</li>
									<li>
										<label>开户行省市：</label>
										<input type="hidden" id="cardProvince" value="${partnerInfoBO.payCardProvince }">
										<input type="hidden" id="cardCity" value="${partnerInfoBO.payCardCity }">
										<select class="sel_min" id="selProvince" name="payCardProvince">
											<option value="0">--请选择省份--</option>
										</select>
										<select class="sel_min" id="selCity" name="payCardCity">
											<option value="0">--请选择城市--</option>
										</select>
									</li>
									<li>
										<label>银行卡号：</label>
										<input type="text" onFocus="this.style.border = '1px solid #2A7CCF'" id="payCardNo" name="payCardNo"
											   onBlur="payCardNoBlur();this.style.border = '1px solid #D5D5D5'" class="text"   maxlength="20" value="${partnerInfoBO.payCardNo }"/>
										<i class="s_tips" id="payCardNos" style="display: none;"></i>
										<i class="e_tips" id="payCardNoe" style="display: none;">&nbsp;</i>
										<p class="zhu_shi_2" id="payCardNoZhu" style="display: none;"></p>
									</li>
								</ul>
							</div>
							<!--渠道账号信息-->
							<div class="button_wrap button_wrap5">
								<a href="javascript:void(0);" onClick="addPartnerSubmit();"  class="bg_green">下一步</a>
								<input type="reset" value="重置">
							</div>
						</div>
					</div>
				</div>
				<!--content-->
			</form>
			<!--foot-->
			<div id="foot">
				<p>北京掌中彩信息科技有限公司  提供技术支持</p>
			</div>
			<!--foot-->
		</div>
	</div>
	<!--main-->
</div>
<script src="${pageContext.request.contextPath}/static/js/basic.js"></script>
</body>
<script type="text/javascript">
    var errorMsg = '${errorMsg}';
    if(errorMsg != null && errorMsg.length > 0){
        prompt.alert(errorMsg);
    }

</script>

</html>
